package com.base.cn.platform.os.controller.statistics.flow;

import com.base.cn.platform.os.common.controller.BaseController;
import com.base.cn.platform.os.common.utils.result.ResultUtil;
import com.base.cn.platform.os.entity.statistics.base.StatisticsDateQueryCondition;
import com.base.cn.platform.os.entity.statistics.flow.ZStatisticsTerminalUVCount;
import com.base.cn.platform.os.service.statistics.flow.ZStatisticsTerminalUVCountBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 种类终端用户使用UV占比Controller
 *
 * @author s.li
 * @date 2019/04/29
 */
@RestController
@RequestMapping("/manage/statistics")
public class ZStatisticsTerminalUVCountController extends BaseController {
    @Autowired
    private ZStatisticsTerminalUVCountBiz zStatisticsTerminalUVCountBiz;

    /**
     * 生成终端设备UV统计数据
     * @param terminalUVCountList
     * @return Map<String,Object>
     */
    @RequestMapping("/genTerminalUVCount")
    public Map<String,Object> genTerminalUVCount(@RequestBody List<ZStatisticsTerminalUVCount> terminalUVCountList){
        zStatisticsTerminalUVCountBiz.genTerminalUVCount(terminalUVCountList);
        return ResultUtil.SUCCESS();
    }

    /**
     * 获取设置访问分布用户数据统计
     * @param dateQueryCondition
     * @return ZStatisticsTerminalUVCount
     */
    @RequestMapping("/queryTerminalUVCountData")
    public ZStatisticsTerminalUVCount queryTerminalUVCountData(@RequestBody StatisticsDateQueryCondition dateQueryCondition){
        return zStatisticsTerminalUVCountBiz.queryTerminalUVCountData(dateQueryCondition);
    }
}
